package com.huawei.designpattern.openclose;

/**
 * @Desc
 * @Author 阿里P10大神退退
 * @date 2020/4/3 23:49
 */
public class JavaDiscountCourse extends JavaCourse {

    public JavaDiscountCourse(Integer id, String name, Double price) {
        super(id, name, price);
    }

    @Override
    public Double getPrice() {
        return super.getPrice();
    }

    public Double getDiscountPrice() {
        return getPrice() * 0.5;
    }
}
